# Contributor: Michał Polański <michal@polanski.me>
# Maintainer: mio <miyoyan@e.email>
pkgname=lagrange
pkgver=1.18.3
pkgrel=0
pkgdesc="Beautiful Gemini client"
url="https://gmi.skyjake.fi/lagrange"
license="BSD-2-Clause"
arch="all"
makedepends="
	cmake
	fribidi-dev
	harfbuzz-dev
	libunistring-dev
	libwebp-dev
	mpg123-dev
	ncurses-static
	openssl-dev
	opusfile-dev
	pcre2-dev
	samurai
	sdl2-dev
	zip
	zlib-dev
	"
subpackages="$pkgname-dbg $pkgname-doc"
source="https://git.skyjake.fi/gemini/lagrange/releases/download/v$pkgver/lagrange-$pkgver.tar.gz"
options="!check" # no test suite

build() {
	cmake -B build -G Ninja \
		-DCMAKE_BUILD_TYPE=Release \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DENABLE_POPUP_MENUS=OFF \
		-DENABLE_RESIZE_DRAW=OFF \
		-DENABLE_TUI=ON \
		-DENABLE_X11_XLIB=OFF \
		-DTFDN_ENABLE_SSE41=OFF
	cmake --build build
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="
07e58ecc1ec381ab3338a3a860484a61c95a110bc7ff28b9b2b522514adc35f1ccbe0d59709d34b3bcefbb528da10712ed6eb1cd36a5762ac9df98294df7abd1  lagrange-1.18.3.tar.gz
"
